<template>
    <div>
        <div class="navbar">我是头部</div>
        <div class="sidebar">
            <Navigation></Navigation>
        </div>
        <div class="zhuti">
            <div class="sidebar-right"></div>
            <div class="head-title">我是主体头</div>
            <keep-alive>
                <router-view v-if="$route.meta.keepAlive"></router-view>
            </keep-alive>
            <router-view v-if="!$route.meta.keepAlive"></router-view>
        </div>
    </div>
</template>
<script>
import Navigation from '../components/navigation.vue'
export default {
    name: 'Index',
    components: { Navigation },
}
</script>
<style lang="less" scoped>
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    margin-left: 230px;
    padding-right: 20px;
    height: 50px;
    background-color: #fff;
    z-index: 99;
}
.sidebar {
    position: fixed;
    width: 230px;
    top: 0;
    left: 0;
    bottom: 0;
    overflow: auto;
    background: #f5f5f5;
}
.zhuti {
    position: relative;
    margin-top: 50px;
    margin-left: 230px;
    padding-right: 20px;
    height: 100vh;
    .head-title {
        position: relative;
        background: #f5f5f5;
        line-height: 50px;
    }
    .sidebar-right {
        position: absolute;
        right: 0;
        width: 20px;
        height: 100%;
        overflow: hidden;
        background: #f5f5f5;
    }
}
</style>